{include file="./header" title="回收站" /}
<script>
$(document).ready(function(e){
	$("#all").click(function(e) {
    	$(".del").attr('checked',true);
    });

});
</script>
<div class="container-fluid">
<div class="btn-group">
        <button type="button" id="all" class="btn btn-primary">{:lang('全选')}</button>

</div>
<br /><br />

<form action="{:url('recover')}" enctype="multipart/form-data" class="am-form" id="frm1">
  <table class="table table-striped table-hover">
    <thead>
        <tr>
			<th>{:lang('选择')}</th>
			<th>{:lang('编号')}</th>
			<th>{:lang('标题')}</th>
			<th class="hidden-xs">{:lang('时间')}</th>
			<th>{:lang('操作')}</th>
        </tr>
    </thead>
    <tbody>

    {foreach name="list" item="val"}
		<tr>
       	  <td class="table-check">
            <label class="am-checkbox">
            <input name="aid[]" type="checkbox" class="del" id="del" value="{$val.aid}">
            </label>
          </td>
            <td>{$val.aid}</td>
            <td><a href="{:url('/aid/'.$val['aid'])}" target="_blank" >{$val.title}</a></td>
            <td class="hidden-xs">{$val.create_time|date="Y-m-d H:i:s"}</td>
            <td>
            <div class="btn-group">
			  <a href="{:url('recover?action=1&aid='.$val['aid'])}" class="btn btn-primary btn-primary">{:lang('恢复')}</a>
			  <a href="{:url('recover?action=2&aid='.$val['aid'])}" class="btn btn-primary btn-danger">{:lang('删除')}</a>
            </div>
          </td>
        </tr>
	{/foreach}
    </tbody>
</table>
	<p>
    <button name="action" type="submit" value="1" class="btn btn-primary">{:lang('恢复')}</button>
    <button name="action" type="submit" value="2" class="btn btn-primary">{:lang('删除')}</button>
    <a href="{:url('recover?action=2&aid=0')}" class="btn btn-primary">{:lang('清空')}</a>
    </p>
</form>
{$page}
</div>
{include file="./footer" /}